#ifndef Kernel_NonLinearTask_h
#define Kernel_NonLinearTask_h

#include "MSolver.h"
#include <list>

namespace Kernel
{
    /**
     *  Group a set of solver objects into one compound.
     *
     * @author nene
     * @date November, 2024.
     */
    class KERNEL_EXPORT NonLinearTask : public MSolver
    {
      public:
        explicit NonLinearTask (MModel& model, const SG::Utility::SGParameter& parameter);
        virtual ~NonLinearTask ();

        /** The entry point to execute the embed-ed algorithm. */
        virtual void Solve ();

      protected:
        /** Perform the operations before the solution step. */
        virtual void StartSolutionStep ();
        /** Solve for the current time step. */
        virtual void SolveSolutionStep ();
        /** Perform the operations after the solution step. */
        virtual void EndSolutionStep ();
        
        virtual bool IsConverged ();
        virtual void StartNonLinearIteration ();
        virtual void SolveNonLinearIteration ();
        virtual void EndNonLinearIteration ();

      protected:
        std::list<MSolver*> mySolvers;
    };
}  // namespace Kernel

#endif  // Kernel_NonLinearTask_h